# -*- coding: utf-8 -*-
from php4dvd.model.user import User
from php4dvd.model.film import Film

def test_search_film_positive(app):
    new_film = Film.random()
    app.ensure_logout()
    app.login(User.Admin())
    app.add_film(new_film)
    assert app.is_film_found(new_film)

def test_search_film_negative(app):
    new_film = Film.random()
    app.ensure_logout()
    app.login(User.Admin())
    assert app.is_film_not_found(new_film)